- The XBRL Standard
- XBRL Specifications
- Registries
- Functions Registry 1.0
- Functions Registry
- xfi:context-segment
- 80139:
Function test xfi:context-segment
Documentation
Tests of function xfi:context-segment($item as element(xbrli:context)) as element(xbrli:segment)?
Owners
Name
|
Affiliation
|
Email
|
Start
|
End
|
Herm Fischer |
UBMatrix / Mark V Systems
|
fischer@markv.com |
10-03-2008 at 00:00:00 |
|
References
http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670693
Test Case Variations
V-01
Returns correct element for context
Documentation
Inputs
Outputs
-
Result test:
$result instance of element(xbrli:segment) and
count( $result ) eq 1 and
$result is /xbrli:xbrl/xbrli:context[@id eq 'c-aconcagua']//xbrli:segment
V-02
Segment for context with no segment
Documentation
Inputs
Outputs
-
Result test:
empty( $result )
V-03
Wrong node to function
Documentation
XPath-defined error for node type incorrect.
Inputs
Outputs
-
Error code: xqt-err:XPTY0004
V-04
A sequence of entities as argument
Documentation
XPath-defined error for node type incorrect arity of argument.
Inputs
Outputs
-
Error code: xqt-err:XPTY0004
V-05
Segment ozone hole returns typed attribute and element nodes
Documentation
Checks element typing, data typing, and atomization.
Inputs
Outputs
-
Result test:
$result[1]/*[1]/*[1]/*[1] instance of element(t:Element4) and
$result[1]/*[1]/*[1]/*[1]/@intAttr instance of attribute(intAttr,xs:integer) and
$result[1]/*[1]/*[1]/*[1]/@qnAttr instance of attribute(qnAttr,xs:QName) and
$result[1]/*[1]/*[1]/*[1]/*[1] instance of element(t:intElt,xs:integer) and
$result[1]/*[1]/*[1]/*[1]/*[2] instance of element(t:qnElt,xs:QName) and
data( $result[1]/*[1]/*[1]/*[1]/@intAttr ) instance of xs:integer and
data( $result[1]/*[1]/*[1]/*[1]/@qnAttr ) instance of xs:QName and
data( $result[1]/*[1]/*[1]/*[1]/*[1] ) instance of xs:integer and
data( $result[1]/*[1]/*[1]/*[1]/*[2] ) instance of xs:QName and
($result[1]/*[1]/*[1]/*[1]/@intAttr + 1 eq 12346) and
($result[1]/*[1]/*[1]/*[1]/@qnAttr eq QName('http://xbrl.org/formula/conformance/example','Element1') ) and
($result[1]/*[1]/*[1]/*[1]/*[1] + 1 eq 54322 ) and
($result[1]/*[1]/*[1]/*[1]/*[2] eq QName('http://xbrl.org/formula/conformance/example','Element2') )
Revisions
Name
|
On
|
Details
|
Herm Fischer |
10-03-2008 at 00:00:00 |
Created the test case.
|
Herm Fischer |
05-12-2008 at 00:00:00 |
Added typed nodes test v-05.
|